function addCdValidator(form){
   
    var checkartist = /^[A-Za-z0-9 ]{3,50}$/;
    var checkalbum = /^[A-Za-z0-9 ]{3,20}$/;
    var checkdate = /^(0?[1-9]|[12][0-9]|3[01])\/(0?[1-9]|1[012])\/((19|20)\\d\\d))$/;
    var checknotracks = /^[0-9]+{0,2}$/;
    var checksynopsis = /^[A-Za-z0-9., ]{20,50}$/;
    var checkprice = /^[0-9]*\.?[0-9]{1,10}$/;
    var noError=true;
    
    if(!checkartist.test(form.cdArtist.value)){
        document.getElementById("cdArtistError").innerHTML='Please enter a valid Artist';
        noError = false;
    }else{
        document.getElementById("cdArtistError").innerHTML='';
    }
    
    if(!checkalbum.test(form.cdAlbum.value)){
        document.getElementById("cdAlbumError").innerHTML='Please enter a valid Album name';
        noError = false;
    }else{
        document.getElementById("cdAlbumError").innerHTML='';
    }
    
    if(!checkdate.test(form.cdDate.value)){
        document.getElementById("cdDateError").innerHTML='Please enter a valid date format';
        noError = false;
    }else{
        document.getElementById("cdDateError").innerHTML='';
    }
    
    if(!checknotracks.test(form.cdTrack.value)){
        document.getElementById("cdTrackError").innerHTML='Please enter a valid no. of tracks';
        noError = false;
    }else{
        document.getElementById("cdTrackError").innerHTML='';
    }
    
    if(!checksynopsis.test(form.synopsis.value)){
         document.getElementById("synopsisError").innerHTML='Please enter a valid synopsis';
         noError = false;
     }else{
         document.getElementById("synopsisError").innerHTML='';
     }
     
     if(!checkprice.test(form.price.value)){
         document.getElementById("priceError").innerHTML='Please enter correct Price format (e.g. 100.00)';
         noError=false;
     }else{
         document.getElementById("priceError").innerHTML='';
     }
    return noError;
}